<template>
  <div class="box">
    <div class="box1">{{ item.consignee }}</div>
    <div class="box2">{{ item.phone }}</div>
    <div class="box3">{{ controlStr(item.address) }}</div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      index: -1,
      index2: -2,
    }
  },
  props: [ 'item', 'aindex' ],
  methods: {
    //地址截取
    controlStr( str ) {
      if ( str.length >= 20 ) {
        str = str.slice( 0, 20 ) + '...'
      }
      return str
    },
  }
}
</script>

<style scoped >
.box {
  border: 2px solid rgb(240, 228, 232);
  width: 220px;
  height: 150px;
  padding: 10px;
  text-align: left;
}

.box:hover {
  border: 2px solid rgb(255, 0, 85);
}

.get {
  border: 2px solid rgb(255, 0, 85);
}

.get>.box1 {
  border-bottom: 2px solid rgb(255, 0, 85);
}

.box:hover>.box1 {
  border-bottom: 2px solid rgb(255, 0, 85);

}

.box:active {
  background-color: rgb(245, 242, 243);
}

.box1 {
  width: 100%;
  font-size: 16px;
  font-weight: bold;
  height: 30%;
  border-bottom: 2px solid rgb(240, 228, 232);
  padding: 3px;
}

.box2 {
  padding-top: 10px;
  color: rgb(139, 139, 139);
}

.box3 {
  padding-top: 5px;
  color: rgb(139, 139, 139);
}
</style>